`ifndef _EZCHIP_C_TEST_SVH
`define _EZCHIP_C_TEST_SVH
class ezchip_c_test extends ezchip_base_test;
    
    `uvm_component_utils(ezchip_c_test)
    //  Var: config_obj
    //config_obj_t config_obj;
    
    //  Group: Variables
    int run_error_cnt;
    //  Group: Functions
    function  void build_phase(uvm_phase phase);
        super.build_phase(phase);
    endfunction : build_phase

    task main_phase(uvm_phase phase);
        int c_error_cnt;
        c_error_cnt=0;
        super.main_phase(phase);
        phase.raise_objection(this, "MAIN PHASE START");
        @(posedge ahb_agt.hacc_reg_drv.regAHB_vif.HRESETn);
        test_start.trigger();
        RunTest(run_error_cnt);
        #10000;
        if(c_error_cnt !=0) begin
           `uvm_error("DPI_C", "DPI C TEST FAILED")
        end
        phase.drop_objection(this, "MAIN PHASE END");
    endtask : main_phase
    
    //  Constructor: new
    function new(string name = "ezchip_c_test", uvm_component parent);
        super.new(name, parent);
        run_error_cnt = 2;
    endfunction: new
endclass: ezchip_c_test
`endif
